package com.xingdian.xingdianhulianweb.web;

import com.xingdian.xingdianhulianweb.common.QueryObject;
import com.xingdian.xingdianhulianweb.common.ServerResponse;
import com.xingdian.xingdianhulianweb.service.IpInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

/* *
 * @Author H2SO4
 * @ClassName: IpInfoController
 * @Description TODO
 * @Date 2019/11/26--18:10
 * */
@Controller
@RequestMapping("/page")
public class IpInfoController {

    @Autowired
    IpInfoService ipInfoService;

    @RequestMapping("/index")
    @ResponseBody
    public ServerResponse findIpInfo(){
        return ipInfoService.findIpInfo();
    }

    @RequestMapping("/products")
    @ResponseBody
    public ServerResponse findIpInfos(){
        return ipInfoService.findIpInfos();
    }

    //焦点动态
    @RequestMapping("/JDlist")
    @ResponseBody
    public Map<String, Object> jdlist(QueryObject queryObject){
        return ipInfoService.jdlist(queryObject);
    }
    //集团资讯
    @RequestMapping("/JTlist")
    @ResponseBody
    public Map<String, Object> jtlist(QueryObject queryObject){
        return ipInfoService.jtlist(queryObject);
    }
    //媒体报道
    @RequestMapping("/MTlist")
    @ResponseBody
    public Map<String, Object> mtlist(QueryObject queryObject){
        return ipInfoService.mtlist(queryObject);
    }

    //省份下拉列表
    @RequestMapping("/GetAreaList")
    @ResponseBody
    public List<Map<String,Object>> getAreaList(){
        return ipInfoService.getAreaList();
    }

    //查询店铺
    @RequestMapping("/GetStoreList")
    @ResponseBody
    public List<Map<String,Object>> getStoreList(Integer province,String key){
        return ipInfoService.getStoreList(province,key);
    }
}
